package com.simon.app.october.modules.sys.entity;

import com.simon.app.october.common.validator.group.AddGroup;
import com.simon.app.october.common.validator.group.UpdateGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Positive;
import javax.validation.constraints.PositiveOrZero;
import java.util.List;

public class SysMenuEntity {
    @Positive(message = "菜单id不能为空", groups = {UpdateGroup.class})
    private Long    menuId;
    private Long    parentId;
    @NotBlank(message = "菜单名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String  name;
    private String  url;
    private String  perms;
    @PositiveOrZero(message = "菜单类不正确", groups = {AddGroup.class, UpdateGroup.class})
    private Integer type;
    private String  icon;
    private Integer orderNum;
    private List<SysMenuEntity> list;

    public Long getMenuId() {
        return menuId;
    }

    public void setMenuId(Long menuId) {
        this.menuId = menuId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPerms() {
        return perms;
    }

    public void setPerms(String perms) {
        this.perms = perms;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public List<SysMenuEntity> getList() {
        return list;
    }

    public void setList(List<SysMenuEntity> list) {
        this.list = list;
    }
}
